package service.impl;

import entity.classes;
import mapper.ClassesMapper;
import org.apache.ibatis.session.SqlSession;
import service.ClassesService;
import util.myBatisUtil;

import java.util.List;

public class ClassesServiceImpl implements ClassesService {
    @Override
    public List<classes> findALL() {
        try (SqlSession session = myBatisUtil.getSS(true)){
            ClassesMapper mapper = session.getMapper(ClassesMapper.class);
            return mapper.findALL();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
